Recently, access networks such as ADSL (Asymmetric Digital Subscriber Line), optical fiber network and the like which are broadband capable of handling a large amount of communication data and which are accessible at all times have been widespread at an accelerated rate even among ordinary homes. At the same time, many kinds of home networks for organically connecting home appliances at home with one another are under standardization. Under these circumstances, it is expected that a user of these home appliances will be able to operate them from an outside location by remotely operating his/her mobile terminal which can be connected to the Internet and by transmitting control information to such home appliances via the Internet and a home network.
When a connection is made between external and home networks in a conventional method: (i) a plurality of home internet terminals assigned with local addresses are connected, via a home network, to a router connected to an internet network; (ii) the router is connected to the internet network via an internet service provider (ISP) using a communication line; and (iii) the internet service provider (ISP) assigns a global address to the router.
When an external server apparatus makes a control request to an Internet terminal at home by the use of a global address, the following conventional methods are used: a router is set to perform static IP masquerading (e.g. Japanese Laid-Open Patent Application No. 2000-341337) and an Internet terminal performs polling (e.g. Japanese Laid-Open Patent Application No. 08-204704).
In static IP masquerading, a router, when receiving packet data in which a specific port number is described as a destination port number, converts the destination address into the local address of an internet terminal, and then routes the packet data to the internet terminal, with a global address and local addresses being registered in a conversion table as fixed addresses in advance. Therefore, it is possible in static IP masquerading to commence a session not only from the local side but also from the global side.
In the method in which an Internet terminal performs polling, on the other hand, a router receives, from an internet terminal, a local packet to be sent to a server apparatus, and sends such packet to the server apparatus after converting the sender's address included in the packet into the global address of the router and converting the sender's port number included in the packet into a port number which can be used by the router. When this is done, a set of information including the local address of the internet terminal, the global address of the router, the sender's port number of the Internet terminal, and the sender's port number of the router is to be stored in the conversion table for a specified period of time. Then, when receiving a response global packet that includes the details of a control intended for the Internet terminal from the server apparatus, the router specifies the destination on the local network by converting the destination address and the destination port number included in the response global packet into the local address of the Internet terminal and the destination port number of the internet terminal with reference to the conversion table, and routes the packet to the internet terminal.
FIG. 13 is a sequence diagram showing the flow of packet data to be sent for controlling a terminal apparatus at home in accordance with the conventional polling method.
The communication system is comprised of a server apparatus 1301 for sending a remote control request from a user in an outside location to a terminal apparatus at home, a router 1302 for making a conversion between global and local addresses and routing packet data between external and home networks, and an internet terminal 1303 for controlling a home appliance and the like according to the control request.
The internet terminal 1303 sends a local packet 1304 to the server apparatus 1301 in order to check whether there is any control request or not. When there is a control request from the user of a mobile terminal device, the server apparatus 1301 sends, to the internet terminal 1303, a response global packet 1306 as a response in which control information, the terminal ID of a terminal to be controlled, sender information, destination information such as the global address of the router 1302 are attached. Then, the internet terminal 1303 receives a response local packet 1307 that includes the control request, and a target terminal will be controlled accordingly. Note that a connectionless UDP (User Datagram Protocol) is used as a communication protocol.
In a communication using UDP, the router stores a relationship between local and global addresses for a certain period of time. Therefore, when the router 1302 receives the response global packet 1306 that includes the control information at an interval corresponding to the above period of time, it is possible to send the response local packet 1307 that includes the control request to the internet terminal 1303 by specifying the local address of a terminal to be controlled, with reference to a corresponding relationship table.